<%@page import="com.netistate.pojo.Labor"%>
<%@page import="com.netistate.pojo.Project"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/common.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/plugin/msgbox/msgbox.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/jsp/labor/labor.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/jsp/project/project.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/plugin/calendar/Calendar.js"></script>
<div class="minWin">
	<form method="post" action="#" id="myForm">
		<table>
			<tbody>
				<% Labor l = (Labor)request.getSession().getAttribute("laobr"); %>
				<input type="hidden" name="lid" id="editLid" value="<%=l.getId()%>"/>
			<tr>
				<td title="项目名称">项目名称：</td>
				<td>
					<select style="width: 140px;" name="projectNameId" id="editProjectNameId">
					  <% List<Project> projectList = (List<Project>)request.getSession().getAttribute("projectList");
						 for(Project p : projectList){
						 if(p.getProjectName().equals(l.getProject().getProjectName())){%>
						 <option value="<%=l.getProject().getId() %>" selected="selected" title="<%=l.getProject().getProjectName() %>"><%=l.getProject().getProjectName() %></option>
						 <%}else{%>
						 <option value="<%=p.getId() %>" title="<%=p.getProjectName() %>"><%=p.getProjectName() %></option>
						<%}} %>
					</select>
				</td>
			</tr>
			<tr>
				<td title="项目阶段">项目阶段：</td>
				<td>
					<select id="editProjectProcess" name="projectProcess">
					   <% if("售前".equals(l.getProjectProcess())){ %>
						 	<option selected="selected" value="售前">售前</option>
						 	<option value="已签单">已签单</option>
						    <option value="实施">实施</option>
						    <option value="已验收">已验收</option>
						    <option value="停滞">停滞</option>
						<%} %>
						<% if("已签单".equals(l.getProjectProcess())){ %>
						 	<option selected="selected" value="已签单">已签单</option>
						 	<option value="售前">售前</option>
						    <option value="实施">实施</option>
						    <option value="已验收">已验收</option>
						    <option value="停滞">停滞</option>
						<% } %>
						<% if("实施".equals(l.getProjectProcess())){ %>
						 	<option selected="selected" value="实施">实施</option>
						 	<option value="售前">售前</option>
						    <option value="已签单">已签单</option>
						    <option value="已验收">已验收</option>
						    <option value="停滞">停滞</option>
						<%  } %>
						<% if("已验收".equals(l.getProjectProcess())){ %>
						 	<option selected="selected" value="已验收">已验收</option>
						 	<option value="售前">售前</option>
						    <option value="已签单">已签单</option>
						    <option value="实施">实施</option>
						    <option value="停滞">停滞</option>
						<% } %>
						<% if("停滞".equals(l.getProjectProcess())){ %>
						 	<option selected="selected" value="停滞">停滞</option>
						 	<option value="售前">售前</option>
						    <option value="已签单">已签单</option>
						    <option value="实施">实施</option>
						    <option value="已验收">已验收</option>
						<%  } %>
					</select>
				</td>
			</tr>

			<tr>
				<td title="工作所属部门">需要改为-类型：</td>
				<td>
					<select id="editSection" name="section">
						<option value="研发" title="研发">研发</option>
						<option value="技术支持" title="技术支持">技术支持</option>
						<option value="交流" title="交流">交流</option>
						<option value="销售" title="销售">销售</option>
						<% if("研发".equals(l.getSection())){ %>
						 	<option selected="selected" value="研发">研发</option>
						 	<option value="技术支持">技术支持</option>
						    <option value="交流">交流</option>
						    <option value="销售">销售</option>
						<%} %>
						<% if("技术支持".equals(l.getSection())){ %>
						 	<option selected="selected" value="技术支持">技术支持</option>
						 	<option value="研发">研发</option>
						    <option value="交流">交流</option>
						    <option value="销售">销售</option>
						<%} %>
						<% if("交流".equals(l.getSection())){ %>
						 	<option selected="selected" value="交流">交流</option>
						 	<option value="研发">研发</option>
						    <option value="技术支持">技术支持</option>
						    <option value="销售">销售</option>
						<%} %>
						<% if("销售".equals(l.getSection())){ %>
						 	<option selected="selected" value="销售">销售</option>
						 	<option value="研发">研发</option>
						    <option value="技术支持">技术支持</option>
						    <option value="交流">交流</option>
						<%} %>
					</select>
				</td>
			</tr>
			<tr>
				<td title="工   时">工&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;时：</td>
				<td>
					<input type="text" readonly="readonly" id="editDatetime" value="<%=l.getDatetime() %>" class="input3" onclick="MyCalendar.SetDate(this)" style="width: 100px" name="day" >
					<span title="用了">用了</span>
					<input type="text" style="width: 50px" value="<%=l.getHours() %>" id="editHours">
					<span title="小时">小时</span>
				</td>
			</tr>
			<tr>
				<td title="是否去现场">是否去现场：</td>
				<td>
				<%if(1 == l.getLocale()){%>
					<input type="radio" checked value="1" name="editLocale">
					<span title="是">是</span>
					<input type="radio"  value="0" name="editLocale">
					<span title="否">否</span>
				<%}else{ %>
					<input type="radio"  value="1" name="editLocale">
					<span title="是">是</span>
					<input type="radio" checked value="0" name="editLocale">
					<span title="否">否</span>
				<%} %>		
				</td>
			</tr>
			<tr>
				<td title="描   述">描&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;述：</td>
				<td>
					<textarea id="editDescr" cols="28" rows="10"><%=l.getDescr() %></textarea>
				</td>
			</tr>
		</tbody></table>
	</form>
</div>
